﻿#ifndef TOUCHPOINT_H
#define TOUCHPOINT_H

#include <QPoint>
#include <QString>

using QTouchPointState = Qt::TouchPointState;

class TouchPoint
{
public:
    explicit TouchPoint();
    explicit TouchPoint(int px, int py, QTouchPointState ps, uint8_t pid, bool valid);
    int x() const;
    int y() const;
    QPoint pos() const;
    QTouchPointState state() const;
    int8_t id() const;
    bool isValid() const;
    QString toString() const;

    void setPos(int px, int py);
    void setPos(const QPoint& pos);
    void setState(QTouchPointState ps);
    void setId(int8_t pid);
    void setValid(bool valid);

private:
    int m_x, m_y;
    QTouchPointState m_state;
    int8_t m_id;
    bool m_valid;
};

#endif // TOUCHPOINT_H
